<HTML><HEAD><TITLE>list_to_heap(+List, -Heap)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(heaps)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>list_to_heap(+List, -Heap)</H1>
takes a list of Key-Datum pairs and forms them into a heap
<H2>Description</H2>

    takes a list of Key-Datum pairs (such as keysort could be used to
    sort) and forms them into a heap.  We could do that a wee bit
    faster by keysorting the list and building the tree directly, but
    this algorithm makes it obvious that the result is a heap, and
    could be adapted for use when the ordering predicate is not @<
    and hence keysort is inapplicable.
    

</BODY></HTML>
